
// 企业相关接口
import Vue from 'vue'
import tools from './../utils/tools'
import {AjaxPlugin} from 'vux'


Vue.use(AjaxPlugin)

const SERVER = tools.baseUrl();
export default {
    SERVER,
    getEnterpriseList: (data) =>( AjaxPlugin.$http.post(`${SERVER}/enterprise/list`+ '?' + data))  , // 获取企业信息列表
    delEnterprise: (data) =>( AjaxPlugin.$http.post(`${SERVER}/enterprise/del`+ '?' + data))  , // 获取企业信息列表
    getEnterpriseDetail: (data) =>( AjaxPlugin.$http.post(`${SERVER}/enterprise/detail`+ '?' + data))  , // 获取企业信息详情
    getEnterpriseModify: (data,param) =>( AjaxPlugin.$http.post(`${SERVER}/enterprise/modify`+ '?' + data,param ))  , // 保存企业信息详情
    optionbytypecode: (data) =>( AjaxPlugin.$http.post(`${SERVER}/sys/optionbytypecode`+ '?' + data ))  , // 获取产品的产量与销售的单位
    productDetail: (data) =>( AjaxPlugin.$http.post(`${SERVER}/enterprise/productDetail`+ '?' + data ))  , // 获取产品的详情
    editProduct: (data) =>( AjaxPlugin.$http.post(`${SERVER}/enterprise/editProduct`+ '?' + data ))  , // 保存产品的详情
    delProduct: (data) =>( AjaxPlugin.$http.post(`${SERVER}/enterprise/delProduct`+ '?' + data ))  , // 删除产品的详情
    upload: (data) =>( AjaxPlugin.$http.post(`${SERVER}/upload`, data ))  , // 上传图片
    getCategoryOneList: (data) =>( AjaxPlugin.$http.post(`${SERVER}/enterprise/getCategoryOneList`+ '?' + data ))  , // 获取所属行业
    getCategoryTwoList: (data) =>( AjaxPlugin.$http.post(`${SERVER}/enterprise/getCategoryTwoList`+ '?' + data ))  , // 获取所属行业
}
